from manim import *
from numpy import flip, insert

LV,QL,QH,JH='#75cfb8','#bbdfc8','#f0e5d8','#ffc478'

class p1(MovingCameraScene):
    def construct(self):
        # self.camera.frame.save_state()
        # self.add(NumberPlane())
        # self.camera.frame.rotate(13*DEGREES,about_point=[0.0, 0.0, 1.0])
        grid=NumberPlane(
            x_range=[0,7.01],
            y_range=[0,5.01]
            ).set_color(BLACK).set_stroke(width=5)
        self.add(grid)
        self.wait()

class p2(MovingCameraScene):
    def construct(self):
        # self.camera.frame.save_state()
        # self.add(NumberPlane())
        # self.camera.frame.rotate(13*DEGREES,about_point=[0.0, 0.0, 1.0])
        grid=NumberPlane(
            x_range=[0,7.01],
            y_range=[0,5.01]
            ).set_color(BLACK).set_stroke(width=5)
        self.add(grid,
            Line(UP*3,DOWN*3).set_color(LV).shift(LEFT*1.5),
            Line(LEFT*4,RIGHT*4).set_color(LV).shift(UP*0.5)
        )
        self.wait()

class p3(MovingCameraScene):
    def construct(self):
        # self.camera.frame.save_state()
        # self.add(NumberPlane())
        # self.camera.frame.rotate(13*DEGREES,about_point=[0.0, 0.0, 1.0])
        grid=NumberPlane(
            x_range=[0,7.01],
            y_range=[0,5.01]
            ).set_color(BLACK).set_stroke(width=5)
        self.add(grid,
            Square(5).set_fill(QL,0.7).shift(LEFT),
            Line(UP*3,DOWN*3).set_color(LV).shift(RIGHT*1.5),
            # Line(LEFT,RIGHT*1.5).set_color(LV).shift(UP*0.5+RIGHT*2.5)
        )
        self.wait()

class p4(MovingCameraScene):
    def construct(self):
        # self.camera.frame.save_state()
        # self.add(NumberPlane())
        # self.camera.frame.rotate(13*DEGREES,about_point=[0.0, 0.0, 1.0])
        grid=NumberPlane(
            x_range=[0,7.01],
            y_range=[0,5.01]
            ).set_color(BLACK).set_stroke(width=5)
        self.add(grid,
            Square(5).set_fill(QL,0.7).shift(LEFT),
            Square(2).set_fill(QH,0.7).shift(UP*1.5+RIGHT*2.5),
            Line(UP*3,DOWN*3).set_color(LV).shift(RIGHT*1.5),
            Line(LEFT,RIGHT*1.5).set_color(JH).shift(UP*0.5+RIGHT*2.5)
        )
        self.wait()